Welcome Guest, you are in: Login
CTS Futures

Page History: MarketData Request

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: 2012/09/28 16:07


Subscribing and Unsubscribing to streaming data

Some systems allow the transmission of real-time quote, order, trade, trade volume, open interest, and/or other price information on a subscription basis. A Market Data Request is a general request for market data on specific securities or forex quotes.

A successful Market Data Request returns one or more Market Data messages containing one or more Market Data Entries. Each Market Data Entry is a Bid, an Offer, a Trade associated with a security, the opening, closing, or settlement price of a security, the buyer or seller imbalance for a security, the value of an index, the trading session high price, low price, or the trade volume or open interest in a security. Market Data Entries usually have a price and a quantity associated with them. For example, in an order book environment, requesting just the top of book will result in only two active Market Data Entries at a time – one for the best Bid and one for the best Offer.

For a full book, the Bid and Offer side may each have several Market Data Entries. Each Market Data Entry might represent an aggregate for each price tier, and only one Market Data Entry per side per price would be active at a time. This is referred to as an Aggregated book. Or several Market Data Entries at one price tier could each represent a broker, Market Maker, ECN or Exchange’s quote in a security, or individual orders in a book. This is a Non-Aggregated book. Alternately, a Market Data Entry could represent a completed trade in a security, the value of an index, the opening, closing, or settlement price of an instrument, the trading session high price, low price, or VWAP, or the volume traded or open interest in a security.

Subscription Types

A Snapshot causes the current state of the market to be sent. A Snapshot + Updates causes the current state of the market to be sent, and any updates as they occur, until the client requests that the Snapshot + Updates be disabled. When Snapshot + Updates is requested, updates may be full or incremental:

Full Refresh: This mode is optimized to trade off increased bandwidth for simplicity in processing and is intended for requests on only a few instruments. Each FIX Market Data message in response to the request will contain the complete data requested for one instrument. If more than just the top of book is requested, this means that both sides, and all price tiers, must be reported in that Market Data message.

Incremental Refresh: This mode is optimized for handling requests for many instruments while conserving bandwidth. Each Market Data Entry is assigned an MDEntryID unique among all other active entries, and several incremental updates of entries for different instruments can be included in one FIX Market Data message.

Message Dictionary

TagField NameReq'dComments
Standard HeaderYMsgType = V
262MDReqIDYMust be unique, or the ID of previous Market Data Request to disable if SubscriptionRequestType = Disable previous Snapshot + Updates Request (2).263SubscriptionRequestTypeYSubcriptionRequestType indicates to the other party what type of response is expected. A snapshot request only asks for current information. A subscribe request asks for updates as the status changes. Unsubscribe will cancel any future update messages from the counter party.264MarketDepthYDepth of market for Book Snapshot265MDUpdateTypeNSpecifies the type of Market Data update. 0=Full Refresh, 1=Incremental Refresh, etc...266AggregatedBook|| NSpecifies whether or not book entries should be aggregated.286OpenCloseSettlFlagNNot Used. Can be used to clarify a request if MDEntryType = Opening Price(4), Closing Price(5), or Settlement Price(6).267NoMDEntryTypesYNumber of MDEntryType fields requested.269MDEntryTypeY|| Must be the first field in this repeating group. This is a list of all the types of Market Data Entries that the firm requesting the Market Data is interested in receiving. 146NoRelatedSymYNumber of symbols (instruments) requested.
Standard TrailerY

Sample Message

Subscribe to streaming data from a specific market

>> 9/28/2012 3:44:48 PM   [FIXMARKETDATAREQUEST] 34=12|49=T4Test|56=test|52=20120928-20:44:48.675|262=md-9/28/2012 3:44:48 PM|263=1|264=10|265=5|267=3|269=0|269=1|269=2|146=1|55=F|48=D_F_F_20120900|167=FUT|207=D_F|
[FIXMARKETDATAREQUEST]
[MsgSeqNum] 34 = 12
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:44:48.675
[MDReqID] 262 = md-9/28/2012 3:44:48 PM
[SubscriptionRequestType] 263 = 1 (SNAPSHOT_PLUS_UPDATES)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 5 (SMART)
[NoMDEntryTypes] 267 = 3
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (TRADE)
[NoRelatedSym] 146 = 1
[Symbol] 55 = F
[SecurityID] 48 = D_F_F_20120900
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F

UnSubscribe from a currently streaming market

>> 9/28/2012 3:45:43 PM   [FIXMARKETDATAREQUEST] 34=14|49=T4Test|56=test|52=20120928-20:45:43.119|262=md-9/28/2012 3:45:43 PM|263=2|264=10|265=5|267=3|269=0|269=1|269=2|146=1|55=F|48=D_F_F_20120900|167=FUT|207=D_F|
[FIXMARKETDATAREQUEST]
[MsgSeqNum] 34 = 14
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:45:43.119
[MDReqID] 262 = md-9/28/2012 3:45:43 PM
[SubscriptionRequestType] 263 = 2 (DISABLE_PREVIOUS_SNAPSHOT_PLUS_UPDATE_REQUEST)
[MarketDepth] 264 = 10
[MDUpdateType] 265 = 5 (SMART)
[NoMDEntryTypes] 267 = 3
[MDEntryType] 269 = 0 (BID)
[MDEntryType] 269 = 1 (OFFER)
[MDEntryType] 269 = 2 (TRADE)
[NoRelatedSym] 146 = 1
[Symbol] 55 = F
[SecurityID] 48 = D_F_F_20120900
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F

Requesting all exchanges

>> 9/28/2012 3:41:16 PM   [FIXSECURITYDEFINITIONREQUEST] 34=5|49=T4Test|56=test|52=20120928-20:41:16.125|320=sc-9/28/2012 3:41:16 PM|321=3|167=FUT|
[FIXSECURITYDEFINITIONREQUEST]
[MsgSeqNum] 34 = 5
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:41:16.125
[SecurityReqID] 320 = sc-9/28/2012 3:41:16 PM
[SecurityRequestType] 321 = 3 (REQUEST_LIST_SECURITIES)
[SecurityType] 167 = FUT (FUTURE)


Requesting all contracts for a specific exchange

>> 9/28/2012 3:40:14 PM   [FIXSECURITYDEFINITIONREQUEST] 34=2|49=T4Test|56=test|52=20120928-20:40:14.707|320=sc-9/28/2012 3:40:14 PM|321=3|167=FUT|207=D_F|
[FIXSECURITYDEFINITIONREQUEST]
[MsgSeqNum] 34 = 2
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:40:14.707
[SecurityReqID] 320 = sc-9/28/2012 3:40:14 PM
[SecurityRequestType] 321 = 3 (REQUEST_LIST_SECURITIES)
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F


Requesting all markets for a specific contract

>> 9/28/2012 3:42:17 PM   [FIXSECURITYDEFINITIONREQUEST] 34=7|49=T4Test|56=test|52=20120928-20:42:17.495|320=sc-9/28/2012 3:42:17 PM|321=3|55=F|167=FUT|207=D_F|
[FIXSECURITYDEFINITIONREQUEST]
[MsgSeqNum] 34 = 7
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:42:17.495
[SecurityReqID] 320 = sc-9/28/2012 3:42:17 PM
[SecurityRequestType] 321 = 3 (REQUEST_LIST_SECURITIES)
[Symbol] 55 = F
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F


Requesting a specific market

>> 9/28/2012 3:39:04 PM   [FIXSECURITYDEFINITIONREQUEST] 34=9|49=T4Test|56=test|52=20120928-20:39:04.757|320=sc-9/28/2012 3:39:04 PM|321=3|55=F|167=FUT|207=D_F|48=D_F_F_20120900|
[FIXSECURITYDEFINITIONREQUEST]
[MsgSeqNum] 34 = 9
[SenderCompID] 49 = T4Test
[TargetCompID] 56 = test
[SendingTime] 52 = 20120928-20:39:04.757
[SecurityReqID] 320 = sc-9/28/2012 3:39:04 PM
[SecurityRequestType] 321 = 3 (REQUEST_LIST_SECURITIES)
[Symbol] 55 = F
[SecurityType] 167 = FUT (FUTURE)
[SecurityExchange] 207 = D_F
[SecurityID] 48 = D_F_F_20120900

FIX API Home Page.

Trade how you want, where you want

support@ctsfutures.com (312) 939 0164

2 Pierce Pl, Suite 200, Itasca, IL 60143

© 2009-2023 Cunningham Trading Systems LLC All rights reserved.